diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c
index c100735..adfa4a7 100644
--- a/drivers/usb/host/xhci-dwc3.c
+++ b/drivers/usb/host/xhci-dwc3.c
@@ -113,16 +113,21 @@
 }
 
 #ifdef CONFIG_DM_USB
-static int xhci_dwc3_setup_phy(struct udevice *dev, int count)
+static int xhci_dwc3_setup_phy(struct udevice *dev)
 {
 	struct xhci_dwc3_platdata *plat = dev_get_platdata(dev);
-	int i, ret;
+	int i, ret, count;
 
-	if (!count)
+	/* Return if no phy declared */
+	if (!dev_read_prop(dev, "phys", NULL))
 		return 0;
 
+	count = dev_count_phandle_with_args(dev, "phys", "#phy-cells");
+	if (count <= 0)
+		return count;
+
 	plat->usb_phys = devm_kcalloc(dev, count, sizeof(struct phy),
-					GFP_KERNEL);
+				      GFP_KERNEL);
 	if (!plat->usb_phys)
 		return -ENOMEM;
 
@@ -136,7 +141,7 @@
 
 		++plat->num_phys;
 	}
-	
+
 	for (i = 0; i < plat->num_phys; i++) {
 		ret = generic_phy_init(&plat->usb_phys[i]);
 		if (ret) {
@@ -145,7 +150,7 @@
 			goto phys_init_err;
 		}
 	}
-	
+
 	for (i = 0; i < plat->num_phys; i++) {
 		ret = generic_phy_power_on(&plat->usb_phys[i]);
 		if (ret) {
@@ -157,7 +162,6 @@
 
 	return 0;
 
-
 phys_poweron_err:
 	for (; i >= 0; i--)
 		generic_phy_power_off(&plat->usb_phys[i]);
@@ -187,7 +191,7 @@
 		ret |= generic_phy_exit(&plat->usb_phys[i]);
 		if (ret) {
 			pr_err("Can't shutdown USB PHY%d for %s\n",
-				i, dev->name);
+			       i, dev->name);
 		}
 	}
 
@@ -206,8 +210,7 @@
 	hcor = (struct xhci_hcor *)((uintptr_t)hccr +
 			HC_LENGTH(xhci_readl(&(hccr)->cr_capbase)));
 
-	ret = xhci_dwc3_setup_phy(dev, dev_count_phandle_with_args(
-						dev, "phys", "#phy-cells"));
+	ret = xhci_dwc3_setup_phy(dev);
 	if (ret)
 		return ret;
 
